package com.yc.system.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yc.system.entity.Book;
import com.yc.system.entity.BookCartLike;
import com.yc.framework.baseClass.BaseService;
import com.yc.framework.baseClass.R;

/**
 * <p>
 * 购物车/收藏 服务类
 * </p>
 *
 * @author 1850140986@qq.com
 * @since 2022-12-03
 */
public interface IBookCartLikeService extends BaseService<BookCartLike> {

 /**
    * 分页查询实体列表
    * @param model 查询参数
    * @return 查询结果
    */
  R list( BookCartLike model);

      /**
      * 根据主键删除实体对象，返回值封装成R，若成功则会把要删除的主键计入返回的R
      *
      * @param id 主键
      * @return 删除是否成功
      */
      R removeModelById(String id);


    R getBCLByUserId(int userId,int bookId);

    R updateByclId(BookCartLike model);

    int getCountByIssureId(int userId);

    int getLikeNumByIssureId(int userId);

    R getCartByPage(IPage<Book> page, QueryWrapper<Book> wrapper, int i, Integer userId);

    R deleteCartById(int cartId);

    R saveCart(BookCartLike model);

    R saveLike(BookCartLike bookCartLike);

    R deleteLike(BookCartLike bookCartLike);

    R changeNum(BookCartLike bookCartLike, int i);
}
